// table头组件
import React, { Component } from 'react'
import { View, Text } from 'react-native'
import commonStyle from '../../libs/commonStyle'
export default class TableHead extends Component {
  render () {
    const list = this.props.list
    return (
      <View
        style={[
          commonStyle.p20,
          commonStyle.flexVerticalCenter,
          commonStyle.flexRow,
          commonStyle.backgroundColorGray
        ]}
      >
        {list.map((item, index) => {
          return (
						<View style={[commonStyle.flexCenter,{ flex: item.flex || 1}]}>
            <Text
              key={item.title}
              style={[{ color: '#777' }, commonStyle.f26]}
            >
              {item.title}
            </Text>
						</View>
          )
        })}
      </View>
    )
  }
}
